package com.phone.client.controller;

import com.phone.client.feign.ShopFeign;
import com.seventh.common.pojo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: clms-seventh
 * @description: 门店控制层
 * @author: 张静
 * @create: 2021-08-04 19:23
 **/
@RestController
@RequestMapping("phone/shop")
@Api(tags="车店")
public class ShopController {
    @Autowired
    private ShopFeign shopFeign;
    @GetMapping("selShops/{areaId}")
    @ApiModelProperty("查找车店")
    public R selShops(@ApiParam("区id")@PathVariable Integer areaId){
        return shopFeign.selShops(areaId);
    }
    /*@GetMapping("allCar")
    @ApiModelProperty("查找车辆")
    public R selAllCar(Integer id){
        System.out.println(id);
        return shopFeign.selAllCar(id);
    }*/
    @ApiOperation(value = "查询汽车类型信息")
    @GetMapping("selectAllCarType")
    public R selectAllCarType(){
        return shopFeign.selectAllCarType();
    }
}
